package com.ankicoo.phonograph.service.impl;

import com.ankicoo.common.model.Pagination;
import com.ankicoo.common.model.PaginationData;
import com.ankicoo.phonograph.entity.RecBasePO;
import com.ankicoo.phonograph.mapper.RecBaseMapper;
import com.ankicoo.phonograph.service.RecBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Description: 实现类
 *
 * @author : QCYANG
 * @date : 2021/8/3 16:18
 */
@Service
public class RecBaseServiceImpl implements RecBaseService {
    @Autowired
    private RecBaseMapper recBaseMapper;

    @Override
    public PaginationData<RecBasePO> findPaginationRecBase(Pagination pagination){
        return new PaginationData<>(pagination, recBaseMapper.selectAll());
    }

    @Override
    public PaginationData<RecBasePO> findPaginationRecBaseByUserId(Pagination pagination, String userId){
        //TODO 查询某个用户创建的所有音频信息
        return null;
    }

    @Override
    public PaginationData<RecBasePO> findPaginationRecBaseWithParam(Pagination pagination, Map<String, String> searchParam){
        //TODO 根据查询条件查找符合条件的 音频信息
        // 如: 地址  音频标题名称 自定义

        return null;
    }

}
